package com.cn.mmd.service;

import com.cn.mmd.mapper.QuestionnairesclstandardMapper;
import com.cn.mmd.mapper.QuestionnairesclsubmitMapper;
import com.cn.mmd.model.Questionnaire;
import com.cn.mmd.model.Questionnairesclstandard;
import com.cn.mmd.model.Questionnairesclsubmit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * SCL-90接口实现
 * Created by Administrator on 2016/9/1.
 */
@Service("SCLService")
public class SCLServiceImpl implements SCLService {

    @Autowired
    QuestionnairesclsubmitMapper questionnairesclsubmitMapper;
    @Autowired
    QuestionnairesclstandardMapper questionnairesclstandardMapper;

    /**
     * 填写问卷SCL-90
     * @param questionnairesclsubmit
     * @return
     */
    public int submitQuestionnaireSCL(Questionnairesclsubmit questionnairesclsubmit){
        return questionnairesclsubmitMapper.insertSelective(questionnairesclsubmit);
    }


    /**
     * 查询SCL-90问卷分数标准
     * @return
     */
    public Questionnairesclstandard selectSCLStandard(){
        return questionnairesclstandardMapper.selectSCLStandard();
    }


    /**
     * 查询SCL-90问卷答题详情
     * @return
     */
    public List<Questionnairesclsubmit> selectSCLSubmit(Map map){
        return questionnairesclsubmitMapper.selectSCLSubmit(map);
    }
}
